package com.jcodes.simple.module.auth.convert;

import com.jcodes.simple.config.MapStructConfig;
import org.mapstruct.InheritInverseConfiguration;
import org.mapstruct.Mapper;
import org.mapstruct.extensions.spring.DelegatingConverter;
import org.springframework.core.convert.converter.Converter;

import com.jcodes.simple.module.auth.controller.ro.UserCreateRo;
import com.jcodes.simple.module.auth.entity.User;

@Mapper(config = MapStructConfig.class)
public interface UserCreateRoConvert extends Converter<UserCreateRo, User> {

    User convert(UserCreateRo ro);

    @InheritInverseConfiguration
    @DelegatingConverter
    UserCreateRo invertConvert(User user);
}
